package com.zdkj.subway.stm.fegin;

import com.zdkj.common.core.constant.SecurityConstants;
import com.zdkj.common.core.constant.ServiceNameConstants;
import com.zdkj.common.core.util.R;
import com.zdkj.subway.stm.dto.in.SwStInvalidTicketDTO;
import com.zdkj.subway.stm.dto.in.SwTkTemporaryDistributionPlanNoticeDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * @author cuilei
 * @create 2020-01-31 11:33
 */
@FeignClient(contextId = "subwayStService", value = ServiceNameConstants.SUBWAY_ST_SERVICE)
public interface SubwayStService {

    /**
     * 添加无效票信息到无效票模块
     *
     * @param swStInvalidTicketDTO
     * @return
     */
    @PostMapping("/swStInvalidTicket/inner")
    R invalidTicketSave(@RequestHeader(SecurityConstants.FROM) String from,
                        @RequestBody List<SwStInvalidTicketDTO> swStInvalidTicketDTO);

    /**
     * 线网临时配收计划通知增加
     *
     * @param swTkTemporaryDistributionPlanNotices
     * @return
     */
    @PostMapping("/swtktemporarydistributionplannotice/info")
    R temporaryDistributionPlanBatchNotice(@RequestHeader(SecurityConstants.FROM) String from,
            @RequestBody List<SwTkTemporaryDistributionPlanNoticeDTO> swTkTemporaryDistributionPlanNotices);


    /**
     * 车站确认领取后修改无效票状态为确认
     *
     * @param swStInvalidTicketDTOList
     * @return
     */
    @PostMapping("/swStInvalidTicket/updateBatch")
    R invalidTicketUpdateBatch(@RequestHeader(SecurityConstants.FROM) String from,
                        @RequestBody List<SwStInvalidTicketDTO> swStInvalidTicketDTOList);
}
